1. Field of the Invention
This invention relates to the field of digital image processing and more particularly to methods of digital image processing using high pass noise modulation for enhanced sharpening.
2. Background of the Invention
Digital halftoning employs digital image processing to produce continuous tone images using fewer luminance or chrominance levels than the input image. A considerable amount of work has been done in this area. This work generally divides along dithering and error diffusion approaches. Both seek to produce pleasing images using digital halftoning.
The dithering approaches, usually called ordered dithering, typically use some type of matrices with integer threshold values. These values are irepeatedly compared to the input image and laid down in the output image in a periodic-tiling manner. However, because of the repeated nature of the tiling process, an artificial pattern or border is sometime visible. The output image may also have low frequency spatial characteristics that increase artifacts, produce less detail and reduce image quality. In addition, information is truncated, resulting in a loss of available image information.
Several approaches have developed improvements to the dithering approach. Frequency modulation produces a screen or threshold array with high frequency content. This is typically known as a stochastic screen or blue noise mask. As these screens or masks are random, they do not produce identifiable patterns. Several techniques are taught in the current state of the art to generate these masks and screens.
One approach, exemplified by U.S. Pat. No. 5,726,772, issued Mar. 10, 1998, teaches generation of blue noise masks using a high pass filter in the frequency domain. Another uses a dot profile and then iteratively optimizes the threshold against a particular gray level. This is shown in U.S. Pat. No. 5,737,452, issued Apr. 7, 1998.
More formulaic approaches are also used. In one approach, shown by U.S. Pat. No. 5,673,121, issued Sep. 30, 1997, a uniform distance technique is used to generate the masks. Another technique uses variance minimization to optimize the screens, shown in U.S. Pat. No. 5,696,602, issued Dec. 9, 1997. A deterministic void and cluster technique is shown in U.S. Pat. No. 5,745,259, issued Apr. 28, 1998. A final example in this area is shown in U.S. Pat. No. 5,555,103, issued Sep. 10, 1996, in which a golden mean number series similar to the Fibonacci sequence is used to derive the masks.
All of these techniques have a distinct disadvantage. Errors in these approaches are truncated and the fine details of the image are lost. The resulting output image often has a grainy appearance.
A second approach, well known in the current art as mentioned previously, is error diffusion. Error diffusion was first disclosed by Floyd and Steinberg in 1976, hence it is typically referred to as Floyd-Steinberg error diffusion. The basic process is shown in FIG. 1. The digital image input typically comprises a pixel value that has some level of gray, expressed in binary terms. For example, in a system with 8-bits of image data, the gray level will be some level between 0 and 255 (28 levels). For an example, a gray level of 200 will be assumed.
In digital printing, however, the value of an ON dot will be 255, and OFF will be 0. For the levels in between these two values, a threshold is used to determine whether a dot is xe2x80x98morexe2x80x99 ON or OFF. If the dot""s value is above the threshold, in this example the threshold equals 128, the dot is turned ON, if it is below, it is turned OFF.
Therefore, an error exists between the intended value and the printed value of the dot. For example, if a dot has an intended value of 200, it lies above the threshold and will be turned ON. Its printed value will be 255, so there is an error of +55 between its intended and printed values.
In error diffusion, the error value can be assigned to the next dot, since the dots are so relatively small in the perceived human eye response; the eye will tend to integrate the next several dots into one larger spot of color. Floyd and Steinberg suggested using four yet-to-be-processed pixels that neighbor the pixel with the error value.
The Floyd-Steinberg approach is shown in FIG. 1. The threshold is applied to the input value, which in this example is 200. The threshold is 128, so that dot is printed. The resulting difference between the intended value of 200 and the printed value of 255 is +55. It will be diffused to the neighbors with the weights of 7 5 3 1, in the positions shown at 14. The sum of the weights is 16, so the error value e(ij)=55/16=3.44. The following table demonstrates the result of error diffusion on the neighboring pixels for a threshold of 128. The original value for all pixels is 144.
It must be understood that the error values computed for each pixel are only those from the previous pixel. Other error values exist for the pixels from other neighboring pixels. For example, if X in the below diagram is the pixel with value 200 from the example, Y is the neighboring pixel. The pixel that has the 5 weight from X is the pixel that has the 3 weight from Y. The error diffusion for X is in parentheses ( ), the error diffusion for Y in the brackets [].
As mentioned above, the flowchart for this process is shown in FIG. 1. Error diffusion has better quality and accuracy than stochastic screening because the error is not truncated, but passed onto other pixels, as shown above. Error diffusion has the ability to adapt its output to the local needs of the image, and introduces edge enhancement qualities into the output image.
Unfortunately, error diffusion can also result in several objectionable artifacts in the output image. These typically occur in highlights and shadows, producing transient noise, worms and edge delays. In midtone areas, the artifacts result in unpleasant patterns and pattern shifts. As a result, several enhancements have been proposed for error diffusion.
These enhancements fall generally into two areas. The first area involves manipulation of the error filter, such as using a bigger mask or filter, or combining the error filter with white noise, blue noise, angle screens or line screens. Examples of these last approaches can be found in U.S. Pat. No. 5,493,416, issued Feb. 20, 1996; U.S. Pat. No. 5,313,287, issued May 17, 1994; and U.S. Pat. No. 5,809,177, issued Sep. 15, 1998.
The other area includes approaches that manipulate the threshold values. Examples include U.S. Pat. No. 5,054,952, issued Sep. 30, 1991; U.S. Pat. No. 5,737,453, issued Apr. 7, 1998; and U.S. Pat. No. 5,692,109, issued Nov. 21, 1997. There are other techniques that have been used as well, including vector error diffusion, which quantizes color error diffusion using weights or penalty functions, shown in U.S. Pat. No. 5,561,751, issued Oct. 11, 1996.
However, these enhancements do not sufficiently improve the Floyd-Steinberg results, when compared to the costs associated with applying them. For example, enhancements that add noise reduce or eliminate artifacts but sacrifice detail and smoothness. The noise introduces graininess to the image. Other algorithms produce good results but are either too slow or too costly to implement.
Other development efforts have focused on creating smooth outputs without artifacts, mostly driven by the increased popularity of inkjet printers. Characteristics of these approaches, which will be referred to as spatially enhanced error diffusion, include nicely placed and well spread dot patterns in highlight and shadow areas. Some approaches use human visual models and printer models based upon enhanced error diffusion. In addition to other examples discussed above, these techniques are exemplified by U.S. Pat. No. 5,051,844, issued Sep. 24, 1991; U.S. Pat. No. 5,070,413, issued Dec. 3, 1991; and U.S. Pat. No. 5,473,439, issued December 5, 1995.
The spatially enhanced error diffusion approaches have the same problems as the enhanced error diffusion techniques in that they are computationally intensive and reduce system performance when implemented in products. In addition, these approaches suffer from reduction of the sharpening effect, although they generally produce smoother and more detailed output.
Therefore, a method is needed that has the advantage of error diffusion of preserving image content by not truncating error, does not produce artifacts such as worms or transient noise, is not computationally intensive, and preserves the sharpening effect provided by the error diffusion process.
One aspect of the invention is an adaptive error diffusion process for producing images. The method includes the steps of receiving input image data, detecting edges in the data, and adding noise to the data depending upon the results of the edge detection. Error diffusion is then performed on the data, where the error diffusion process is altered because of the noise added to the data. The amount of noise added to the data is higher for pixels that have high edge content.
In an alternate embodiment, the noise is added to the threshold used in the error diffusion process. The noise used in either embodiment can be white, blue, green, pink or patterned noise, as examples. The error diffusion process can be the typical Floyd-Steinberg error diffusion process or spatially enhanced error diffusion.